<template>
  <div>
    <vxe-table border :data="logList" height="500">
      <vxe-column field="create_time" title="日期" width="200"></vxe-column>
      <vxe-column field="create_username" title="操作人" width="200"></vxe-column>
      <vxe-column field="log_info" title="操作记录">
        <template #default="{ row }">
          <div v-html="row.log_info"></div>
        </template>
      </vxe-column>
    </vxe-table>
  </div>
</template>

<script setup name="Log">
import { onMounted } from "vue";
import { getLogList } from "../../api.js";
let formData = reactive(inject("form"));
const logList = ref([]);
onMounted(() => {
  getLog();
});
const getLog = () => {
  getLogList({ spuId: formData.value.id })
    .then((res) => {
      logList.value = res.data;
    })
    .finally(() => {});
};
</script>

<style lang="scss"></style>
